<template>
	<view class="main">
		<u-navbar back-text="" :border-bottom="false" back-icon-color="#ffffff" title-color="#ffffff" title="币种详情" :background="background">
			<view class="slot-wrap">
				<view class="right" @click="ToPage('/pages/TransactionRecord/index')">
					交易记录
				</view>
			</view>
		</u-navbar>
		<view class="header"></view>
		<view class="content">
			<view class="card">
				<view class="top">
					<text class="title">BTC/USDT</text>
					<text class="tag">单次策略</text>
				</view>
				<view class="cont">
					<view class="item">
						<view class="des">持仓金额(USDT)</view>
						<view class="title">0.00000000</view>
					</view>
					<view class="item">
						<view class="des">持仓均价</view>
						<view class="title">0.000000</view>
					</view>
					<view class="item">
						<view class="des">补仓次数</view>
						<view class="title">0</view>
					</view>
				</view>
				<view class="cont">
					<view class="item">
						<view class="des">持仓数量(BTC)</view>
						<view class="title">0.00000000</view>
					</view>
					<view class="item">
						<view class="des">当前价格</view>
						<view class="title">0.000000</view>
					</view>
					<view class="item">
						<view class="des">涨幅</view>
						<view class="title">0</view>
					</view>
				</view>
			</view>
			<view class="" style="height: 150rpx;"></view>
			<view class="details">
				<view class="title">
					<text>策略详情</text>
					<view class="ico"></view>
				</view>
				<view class="cont">
					<view class="item">
						<view class="left">
							<text>首单额度</text>
							<text>10</text>
						</view>
						<view class="left">
							<text>倍投上限</text>
							<text>10</text>
						</view>
					</view>
					<view class="item">
						<view class="left">
							<text>止盈比例</text>
							<text>1.3%</text>
						</view>
						<view class="left">
							<text>当前价格</text>
							<text>0.3%</text>
						</view>
					</view>
					<view class="item">
						<view class="left">
							<text>补仓涨幅</text>
							<text>4%</text>
						</view>
						<view class="left">
							<text>补仓回调</text>
							<text>4%</text>
						</view>
					</view>
				</view>
			</view>
			<view class="operating">
				<view class="site">
					<view class="title">策略操作</view>
					<view class="cont">
						<view class="item">
							<view class="ico"></view>
							<view class="title">策略循环/单次策略</view>
						</view>
						<view class="item" @click="ToPage('/pages/Transaction/site')">
							<view class="ico"></view>
							<view class="title">交易设置</view>
						</view>
						<view class="item" @click="openClear">
							<view class="ico"></view>
							<view class="title">清仓卖出</view>
						</view>
					</view>
				</view>
			</view>
			<view class="submit">
				<u-button>启动</u-button>
			</view>
		</view>
		<u-modal v-model="clear" title="清仓卖出" show-cancel-button content="按照当前的价格，卖出所有资产，确定清仓吗？"></u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				clear:false,//清仓卖出
				background: {
					backgroundColor: '#2E74FD',
				}
			}
		},
		onReady() {
			
		},
		onLoad() {

		},
		onShow() {
			
		},
		methods: {
			// 点击清仓
			openClear(){
				this.clear = true
			},
			// 跳转页面
			ToPage(url,data=''){
				uni.navigateTo({
				    url: url
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main{
		min-height: 100vh;
		background:$G-bg-color;
		.slot-wrap {
			display: flex;
			align-items: center;
			justify-content: flex-end;
			flex: 1;
			padding:0 26rpx;
			.right{
				font-size: 28rpx;
				font-family: $G-fm;
				font-weight: 400;
				color: #FFFFFF;
				line-height: 40rpx;
			}
		}
		.header{
			height: 250rpx;
			background-color: #2E74FD;
			margin-top: -1px;
		}
		.content{
			position: relative;
			.card{
				width: calc(100% - 64rpx);
				background: #FFFFFF;
				border-radius: 16rpx;
				padding: 32rpx;
				position: absolute;
				left: 32rpx;
				top:-188rpx;
				.top{
					.title{
						font-size: 28rpx;
						font-family:$G-fm;
						font-weight: 600;
						color: #000000;
						line-height: 40rpx;
					}
					.tag{
						margin-left: 12rpx;
						padding: 2rpx 10rpx;
						font-size: 20rpx;
						font-family: $G-fm;
						font-weight: 400;
						color: #0066EC;
						line-height: 28rpx;
						background: rgba(47, 115, 253, 0.1);
						border-radius: 6rpx;
					}
				}
				.cont{
					display: flex;
					justify-content: space-between;
					margin-top: 42rpx;
					.item{
						width: 33.33%;
						.des{
							font-size: 24rpx;
							font-family: $G-fm;
							font-weight: 400;
							color: #999999;
							line-height: 32rpx;
							margin-bottom: 2rpx;
						}
						.title{
							font-size: 22rpx;
							font-family: $G-fm;
							font-weight: 600;
							color: #000000;
							line-height: 32rpx;
						}
					}
				}
			}
			
		}
		.details{
			margin: 0 32rpx 0 32rpx;
			padding: 32rpx;
			background: #FFFFFF;
			border-radius: 16rpx;
			>.title{
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-bottom: 26rpx;
				text{
					font-size: 28rpx;
					font-family: $G-fm;
					font-weight: 600;
					color: #222222;
					line-height: 40rpx;
				}
				.ico{
					width: 32rpx;
					height: 32rpx;
					background: url(../../static/images/ico/why.png)center center no-repeat;
					background-size: 100%;
				}
			}
			.cont{
				.item{
					display: flex;
					align-items: center;
					padding: 8rpx 0;
					.left{
						width: 45%;
						margin-right:2% ;
						text{
							font-size: 24rpx;
							font-family: $G-fm;
							font-weight: 400;
							color: #8B8B93;
							line-height: 34rpx;
						}
						text:nth-child(2){
							font-weight: 600;
							color: #2F73FD;
							margin-left: 20rpx;
						}
					}
				}
			}
		}
		.operating{
			margin: 20rpx 32rpx 0 32rpx;
			background: #FFFFFF;
			border-radius: 16rpx;
			.site{
				padding: 28rpx 36rpx;
				.title{
					padding-left: 10rpx;
					font-size: 28rpx;
					font-family: $G-fm;
					font-weight: 600;
					color: #000000;
					line-height: 40rpx;
					position: relative;
				}
				.cont{
					padding: 38rpx 0 0 0;
					display: flex;
					justify-content: space-between;
					.item{
						width: 33.33%;
						text-align: center;
						.ico{
							width: 106rpx;
							height: 106rpx;
							margin: 0 auto;
							box-shadow: 0px 0px 8px 0px rgba(194, 192, 192, 0.5);
							border-radius: 6px;
							background: #FFFFFF url(../../static/images/ico/tran_ico2.png)center center no-repeat;
							background-size: 42rpx;
						}
						.title{
							margin-top: 12rpx;
							font-size: 24rpx;
							font-family: $G-fm;
							font-weight: 400;
							color: #000000;
							line-height: 34rpx;
							padding-left: 0;
						}
					}
					.item:nth-child(2){
						.ico{
							background: #FFFFFF url(../../static/images/ico/tran_ico1.png)center center no-repeat;
							background-size: 42rpx;
						}
					}
					.item:nth-child(3){
						.ico{
							background: #FFFFFF url(../../static/images/ico/tran_ico3.png)center center no-repeat;
							background-size: 42rpx;
						}
					}
				}
			}
		}
		
		.submit{
			padding-top: 50rpx;
			button{
				width: 694rpx;
				height: 80rpx;
				background: #2F73FD;
				box-shadow: 0px 4rpx 8rpx 0px #A6C4FF;
				border-radius: 40rpx;
				font-size: 32rpx;
				font-family: $G-fm;
				font-weight: 600;
				color: #FFFFFF;
				line-height: 44rpx;
			}
			/deep/.u-hairline-border:after{
				border: 0;
			}
		}
	}
</style>
